
$(function() {
	var intuser = document.getElementById(1);
	var user = document.getElementById(2);
	var cookie = getCookie("us_name");
//	alert(cookie);
	if(cookie==null){
		intuser.className="show";
		user.className="hide";
		var ap = user.getElementsByTagName("a");
		ap[0].innerHTML=cookie;
		window.location.href ="login.html";
		return;
	}else{
		intuser.className="hide";
		user.className="show";
		var ap = user.getElementsByTagName("a");
		ap[0].innerHTML=cookie;
	}
	$("#outuser").click(outuser);
});

function outuser() {
//	addCookie("us_name",0,1);
	delCookie("us_name");
	window.location.href="../index.html";
}
